<template>
  <div class="home">
    <div
      class="pointer"
      @click="$router.push('/targetList')"
      style="margin-top: 20px; margin-left: 20px">
      <i class="el-icon-arrow-left"></i> 我的投标
    </div>
    <div class="items">
      <div class="item">
        <div>企业名称：</div>
        <div>{{ data.enterpriseName }}</div>
      </div>

      <div class="item">
        <div>统一社会信用代码：</div>
        <div>{{ data.unifiedSocialInformationCode }}</div>
      </div>
      <div class="item">
        <div>公司注册地址：</div>
        <div>{{ data.companyRegisteredAddress }}</div>
      </div>
      <div class="item">
        <div>机构类型：</div>
        <div>{{ data.mechanismType }}</div>
      </div>
      <div class="item">
        <div>企业性质：</div>
        <div>{{ data.natureOfEnterprise }}</div>
      </div>
      <div class="item">
        <div>成立日期：</div>
        <div>{{ data.dateOfEstablishment }}</div>
      </div>
      <div class="item">
        <div>法人：</div>
        <div>{{ data.legalPerson }}</div>
      </div>
      <div class="item">
        <div>法人身份证：</div>
        <div>{{ data.corporateIdentityCard }}</div>
      </div>
      <div class="item">
        <div>单位联系地址：</div>
        <div>{{ data.corporateContactAddress }}</div>
      </div>
      <div class="item">
        <div>经营范围：</div>
        <div>{{ data.businessScope }}</div>
      </div>
      <div class="item">
        <div>营业执照扫描件：</div>
      </div>
      <div class="item">
        <div>法人身份证扫描件：</div>
      </div>
      <div class="item">
        <div>营业执照有效期：</div>
        <div>{{ data.validityPeriodOfBusinessLicense }}</div>
      </div>
      <div class="item">
        <div>公司简介：</div>
        <div>{{ data.companyProfile }}</div>
      </div>
      <div class="item">
        <div>开户行：</div>
        <div>{{ data.bankOfDeposit }}</div>
      </div>
      <div class="item">
        <div>银行账号：</div>
        <div>{{ data.bankAccountNumber }}</div>
      </div>
      <div class="item">
        <div>开户行地址：</div>
        <div>{{ data.openingAddress }}</div>
      </div>
      <div class="item">
        <div>单位注册电话：</div>
        <div>{{ data.unitRegistrationTelephone }}</div>
      </div>
      <div class="item">
        <div>单位注册地址：</div>
        <div>{{ data.unitRegisteredAddress }}</div>
      </div>
      <div class="item">
        <div>注册资本（万元）：</div>
        <div>{{ data.registeredCapital }}万</div>
      </div>
      <div class="item">
        <div>实缴资本：</div>
        <div>{{ data.paidInCapital }}万</div>
      </div>
      <div class="item">
        <div>开户许可证：</div>
        <div>
          {{ data.accountOpeningPermit }}
        </div>
      </div>
    </div>
    <div style="text-align: center; margin-top: 20px">
      <el-button @click="setHaveBidList" type="primary">提交</el-button>
    </div>
  </div>
</template>
<script>
import { getHaveBidById, setHaveBidList } from "@/api/procurement/HaveBid";
export default {
  data() {
    return {
      data: {},
      fileList: [],
    };
  },
  mounted() {
    this.getInfo();
  },
  methods: {
    setHaveBidList() {
      setHaveBidList({
        id: this.$route.query.id,
        fileList: this.fileList.join(","),
      }).then((res) => {
        if (res.code == 200) {
          this.$message.success("提交成功");
          this.$router.push("/targetList");
        } else {
          this.$message.warning("提交失败");
        }
      });
    },
    getInfo() {
      getHaveBidById({ id: this.$route.query.id }).then((res) => {
        this.data = res.data.procurementSnapshotInformation;
        console.log(res);
      });
    },

  },
};
</script>
<style scoped>
.upload {
  display: flex;
  padding-left: 80px;
  margin-top: 20px;
}
.items {
  display: flex;
  flex-wrap: wrap;
  margin-top: 25px;
}
.items > div {
  width: 50%;
}
.item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin: 15px 0;
  padding-left: 80px;
}
.item > div:nth-child(1) {
  margin-right: 20px;
  text-align: left;
}
.item button {
  padding: 0 !important;
}
.item > div:nth-child(2) {
  color: #666;
}
</style>
